import { createRouter, createWebHistory } from 'vue-router'
import TaskHome from '../components/TaskHome.vue'
import AddTask from '../components/AddTask.vue'
import TaskDetail from '../components/TaskDetail.vue'
import History from '../components/History.vue'
import UserProfile from '../components/UserProfile.vue'

const routes = [
  {
    path: '/',
    name: 'TaskHome',
    component: TaskHome
  },
  {
    path: '/add-task',
    name: 'AddTask',
    component: AddTask
  },
  {
    path: '/task-detail/:id',
    name: 'TaskDetail',
    component: TaskDetail,
    props: true
  },
  {
    path: '/history',
    name: 'History',
    component: History
  }
  ,
  {
    path: '/user-profile',
    name: 'UserProfile',
    component: UserProfile
  }
  
  
]

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes
})

export default router